function view=readView_ver_0005(path,filename)
	pFile = fopen([ path '/' filename]);
	if pFile == -1
		fprintf('can not open file %s',[path '/' filename]);
	end
	% pluginVersion
	version = str2num(fgetl(pFile));
	if version ~= 5
	fprintf(' can not read version %d, need version 0005', version);        
	view.P = zeros(12,1);
	view.width = 0;
	view.height = 0;
	view.pan = 0;
	view.tilt = 0;
	view.roll = 0;
	view.scale = 0;
	view.dx = 0;
	view.dy = 0;
	view.eye = 0;
    view.cam_dir = 0;
        return;
	end
	% image path
	filename = fgetl(pFile);

	% image size
	txt_line = fgetl(pFile);
	data = sscanf(txt_line,'%f,');
	width = data(1); height = data(2);
	
	% object size;
	txt_line = fgetl(pFile);
	
	
	%% solve P matrix
	% format string 
	txt_line = fgetl(pFile);
	% number of points
	npt = str2num(fgetl(pFile));
	X = [];x=[];
	for i_line = 1:npt
		txt_line = fgetl(pFile);
		data = sscanf(txt_line,'%f,');
		X = [X, data(1:3)];
		x = [x, data(4:5)];
	end
	X = X; % because points are on a 30 inch radius sphere
	X = [X;ones(1,npt)];
	x = [x;ones(1,npt)];

	P1 = x*X'*inv(X*X');
	P2=x/X;
    P = DLTProjection(X,x);

	% cam.eye, cam.target, cam.up
	txt_line = fgetl(pFile);
	data = sscanf(txt_line,'%f,');
	%eye = data'*25.4; % change to mm from inch
     eye = data;
     
	txt_line = fgetl(pFile);
    target = sscanf(txt_line,'%f, ');
	txt_line = fgetl(pFile);
				
    % extract camera direction
    txt_line = fgetl(pFile);
    cam_dir = sscanf(txt_line,'%f,');
    cam_dir = cam_dir./norm(cam_dir);
    
	% parse pan tilt roll etc
	txt_line = fgetl(pFile);
	data = sscanf(txt_line,'%f,');
	pan = data(1)/180*pi;
	tilt = data(2)/180*pi;
	roll = data(3)/180*pi;
	
	scale = data(4);
	dx = data(5);
	dy = data(6);
	


	
	% output
	view.P = P;
	view.width = width;
	view.height = height;
	view.pan = pan;
	view.tilt = tilt;
	view.roll = roll;
	view.scale = scale;
	view.dx = dx;
	view.dy = dy;
	view.eye = eye;
    view.cam_dir = cam_dir;
	fclose(pFile);
end